home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Installer SDK Cornucopia 1.0.2 / Script Examples / Font Compression⁄Split Example / Makefile < prev    next >
Encoding:
Makefile  |  1996-09-13  |  5.0 KB  |  121 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "fontCompressSplit.r", the example for InstaCompOne font compression
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "fontCompressSplit" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "fontCompressSplit.debug" ( note: ".r" is omitted )
  12. #            
  13. #
  14. #
  15.  
  16. # • script names
  17.  
  18. # the installer script name
  19. scriptName                = fontCompressSplit
  20. # the debug version installer script name
  21. debugScriptName            = "{scriptName}.debug"
  22. # filename for ScriptCheck extension that will run when ScriptCheck does
  23. localScriptCheckExtName    = {scriptName}.scx
  24.  
  25.  
  26. # • support directory names
  27.  
  28. # directory where ScriptCheck MPW tool can be found
  29. ScriptCheckDir            = :::Tools:Released:ScriptCheck 4.0.3:
  30. # directory where RIncludes can be found
  31. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  32. # directory where the Installer Debugger can be found
  33. InstallerDebuggerDir    = :::Tools:Released:Installer Debugger 4.0.3:
  34. # directory where the InstaCompOne stuff can be found
  35. InstaCompOneDir            = :::Tools:Released:InstaCompOne 1.1:
  36. # • tool names
  37.  
  38. # InstaCompOne compression tool
  39. compressTool            = {InstaCompOneDir}InstaCompOneTool
  40.  
  41. # Splitting tool
  42. splitTool                = {InstaCompOneDir}FileAndRsrcSplitterTool
  43.  
  44. # Original ScriptCheck Extension
  45. ScriptCheckExtension    = {InstaCompOneDir}InstaCompOneSCExt.rsrc
  46.  
  47. # Fond Encoder tool
  48. fondTool                = {InstaCompOneDir}FondEncoderTool
  49.  
  50.  
  51.  
  52. # • simple font compression
  53.  
  54. # source file name
  55. CompressFontFileName            = Chicago
  56. # archive resulting from compression of source file
  57. CompressFontArchiveName            = :Disk 1:fontTome
  58.  
  59. # • split font compression
  60.  
  61. # source file name
  62. SplitFontFileName          =    Monaco
  63. # interim file resulting from splitting operation
  64. SplitFontTempName          =    splitFontObjectFile
  65. # archive resulting from compression of first split portion
  66. SplitFontArchive1          =    :Disk 1:splitFontTome1
  67. # archive resulting from compression of second split portion
  68. SplitFontArchive2          =    :Disk 2:splitFontTome2
  69.  
  70.  
  71. # make the debug version of finished installer script
  72. "{debugScriptName}" ƒ "{scriptName}"
  73.     # make a copy of the finished installer script and rename the copy
  74.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  75.     # add the installer debugger resources to the copied installer script
  76.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  77.  
  78. # make the standard version of finished installer script
  79. "{scriptName}" ƒƒ "{scriptName}.r" "{CompressFontArchiveName}" "{SplitFontArchive1}" "{SplitFontArchive2}" "{localScriptCheckExtName}"
  80.     # establish current date with time of NOON
  81.     set theTime    "'`date -d -s` 12:00:00 PM'"
  82.     # rez the installer source into the form that the installer can read
  83.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
  84.     # establish filename for finished installer script, set creation date and time, set attributes
  85.     SetFile -a b -d {theTime} "{scriptName}"
  86.     # run scriptcheck utility on the rezzed installer script
  87.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  88.     # set modification date and time for finished installer script
  89.     SetFile -m {theTime} "{scriptName}"
  90.  
  91. # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
  92. "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
  93.     # copy and rename the original scriptcheck extension
  94.     Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
  95.  
  96. # do the simple font compression
  97. "{CompressFontArchiveName}" ƒ "{CompressFontFileName}"
  98.     # compress entire 'sfnt' resource into the font archive
  99.     "{compressTool}" "{CompressFontFileName}" -k sfnt=9217 -a part=128 -o "{CompressFontArchiveName}"
  100.     # compress entire 'NFNT' resource into the font archive
  101.     "{compressTool}" "{CompressFontFileName}" -k NFNT=1025 -a part=129 -o "{CompressFontArchiveName}"
  102.     # duplicates the FOND resource within "Chicago" and calls it 'iFND'
  103.     "{fondTool}" "{CompressFontFileName}" -o "{CompressFontArchiveName}"
  104.     
  105. # do the split font compression
  106. "{SplitFontArchive1}"  "{SplitFontArchive2}" ƒ "{SplitFontFileName}"
  107.     # split single 'sfnt' rsrc - largest piece=30K - put into 'sfnt' rsrc 200,201, etc. = place in interim file
  108.     "{splitTool}" "{SplitFontFileName}" -k sfnt=17127 -a sfnt=200 -s 30000 -o "{SplitFontTempName}"
  109.     # compress the first 'sfnt' part into first archive for split font
  110.     "{compressTool}" "{SplitFontTempName}" -k sfnt=200 -a part=200 -o "{SplitFontArchive1}" 
  111.     # compress the second 'sfnt' part into second archive ( for split font )
  112.     "{compressTool}" "{SplitFontTempName}" -k sfnt=201 -a part=201 -o "{SplitFontArchive2}"
  113.     # compress one of the two 'NFNT' rsrc's into first archive ( for split font )
  114.     "{compressTool}" "{SplitFontFileName}" -k NFNT=17774 -a part=300 -o "{SplitFontArchive1}" 
  115.     # compress the remaining 'NFNT' into first archive ( for split font )
  116.     "{compressTool}" "{SplitFontFileName}" -k NFNT=19242 -a part=301 -o "{SplitFontArchive1}"
  117.     # duplicates the FOND resource within "Monaco" and calls it 'iFND'
  118.     "{fondTool}" "{SplitFontFileName}" -o "{SplitFontArchive1}"
  119.  
  120.  
  121.